package com.xinlong.shop.core.blind.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xinlong.shop.core.blind.entity.BlindBox;
import com.xinlong.shop.core.blind.entity.BlindBoxOrder;
import com.xinlong.shop.core.blind.entity.BlindBoxOrderQueryParam;
import com.xinlong.shop.core.blind.entity.dto.BlindBoxOrderDTO;

import java.util.List;

/**
 * <p>
 * 盲盒订单表 服务类
 * </p>
 *
 * @author Sylow
 * @since 2023-06-13
 */
public interface IBlindBoxOrderService extends IService<BlindBoxOrder> {

    void update(BlindBoxOrder blindBoxOrder, Integer id);

    void delete(Integer id);

    BlindBoxOrder createOrder(BlindBox blindBox, String ruleId, Integer memberId);

    /**
     * 盲盒订单支付成功
     * @param orderSn
     * @param payOrderSn
     * @return
     */
    boolean paySuccess(String orderSn, String payOrderSn);

    IPage<BlindBoxOrderDTO> findByPage(IPage<BlindBoxOrderDTO> page, BlindBoxOrderQueryParam queryParam);

    List<BlindBoxOrderDTO> findByMemberId(Integer memberId);

}
